/**
 * Generate time : 2011-07-27 11:05:51
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ca.domain;

import java.math.BigDecimal;
import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * VZMCA14
 * 
 */
public class VZMCA14 extends DaoEPBase {

	private String fdKeyId = " ";
	private String fdYear = " ";
	private String fdMonth = " ";
	private String fdDepartmentId = " ";
	private String fdMaterialId = " ";
	private String fdEngineeringId = " ";
	private String fdMetric = " ";
	private BigDecimal fdApplicationNumber = new BigDecimal("0");
	private BigDecimal fdAuditNumber = new BigDecimal("0");
	private BigDecimal fdActualNumber = new BigDecimal("0");
	private BigDecimal fdExportedNumber = new BigDecimal("0");
	private String fdMaterialTypeId = " ";
	private BigDecimal fdPrice = new BigDecimal("0");

	private String fdLevel = " ";
	private String fdParentId = " ";
	private String fdName = " ";

	private String display = " ";
	private String value = " ";

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdYear");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMonth");
		eiColumn.setFieldLength(2);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEngineeringId");
		eiColumn.setFieldLength(320);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMetric");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdApplicationNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAuditNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdActualNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdExportedNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialTypeId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPrice");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdLevel");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentId");
		eiColumn.setFieldLength(300);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("display");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("value");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public VZMCA14() {
		initMetaData();
	}

	/**
	 * get the fdKeyId
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdYear
	 * 
	 * @return the fdYear
	 */
	public String getFdYear() {
		return this.fdYear;
	}

	/**
	 * set the fdYear
	 */
	public void setFdYear(String fdYear) {
		this.fdYear = fdYear;
	}

	/**
	 * get the fdMonth
	 * 
	 * @return the fdMonth
	 */
	public String getFdMonth() {
		return this.fdMonth;
	}

	/**
	 * set the fdMonth
	 */
	public void setFdMonth(String fdMonth) {
		this.fdMonth = fdMonth;
	}

	/**
	 * get the fdDepartmentId
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdMaterialId
	 * 
	 * @return the fdMaterialId
	 */
	public String getFdMaterialId() {
		return this.fdMaterialId;
	}

	/**
	 * set the fdMaterialId
	 */
	public void setFdMaterialId(String fdMaterialId) {
		this.fdMaterialId = fdMaterialId;
	}

	/**
	 * get the fdEngineeringId
	 * 
	 * @return the fdEngineeringId
	 */
	public String getFdEngineeringId() {
		return this.fdEngineeringId;
	}

	/**
	 * set the fdEngineeringId
	 */
	public void setFdEngineeringId(String fdEngineeringId) {
		this.fdEngineeringId = fdEngineeringId;
	}

	/**
	 * get the fdMetric
	 * 
	 * @return the fdMetric
	 */
	public String getFdMetric() {
		return this.fdMetric;
	}

	/**
	 * set the fdMetric
	 */
	public void setFdMetric(String fdMetric) {
		this.fdMetric = fdMetric;
	}

	/**
	 * get the fdApplicationNumber
	 * 
	 * @return the fdApplicationNumber
	 */
	public BigDecimal getFdApplicationNumber() {
		return this.fdApplicationNumber;
	}

	/**
	 * set the fdApplicationNumber
	 */
	public void setFdApplicationNumber(BigDecimal fdApplicationNumber) {
		this.fdApplicationNumber = fdApplicationNumber;
	}

	/**
	 * get the fdAuditNumber
	 * 
	 * @return the fdAuditNumber
	 */
	public BigDecimal getFdAuditNumber() {
		return this.fdAuditNumber;
	}

	/**
	 * set the fdAuditNumber
	 */
	public void setFdAuditNumber(BigDecimal fdAuditNumber) {
		this.fdAuditNumber = fdAuditNumber;
	}

	/**
	 * get the fdActualNumber
	 * 
	 * @return the fdActualNumber
	 */
	public BigDecimal getFdActualNumber() {
		return this.fdActualNumber;
	}

	/**
	 * set the fdActualNumber
	 */
	public void setFdActualNumber(BigDecimal fdActualNumber) {
		this.fdActualNumber = fdActualNumber;
	}

	/**
	 * get the fdExportedNumber
	 * 
	 * @return the fdExportedNumber
	 */
	public BigDecimal getFdExportedNumber() {
		return this.fdExportedNumber;
	}

	/**
	 * set the fdExportedNumber
	 */
	public void setFdExportedNumber(BigDecimal fdExportedNumber) {
		this.fdExportedNumber = fdExportedNumber;
	}

	/**
	 * get the fdMaterialTypeId
	 * 
	 * @return the fdMaterialTypeId
	 */
	public String getFdMaterialTypeId() {
		return this.fdMaterialTypeId;
	}

	/**
	 * set the fdMaterialTypeId
	 */
	public void setFdMaterialTypeId(String fdMaterialTypeId) {
		this.fdMaterialTypeId = fdMaterialTypeId;
	}

	/**
	 * get the fdPrice
	 * 
	 * @return the fdPrice
	 */
	public BigDecimal getFdPrice() {
		return this.fdPrice;
	}

	/**
	 * set the fdPrice
	 */
	public void setFdPrice(BigDecimal fdPrice) {
		this.fdPrice = fdPrice;
	}

	/**
	 * set the fdLevel
	 */
	public void setFdLevel(String fdLevel) {
		this.fdLevel = fdLevel;
	}

	/**
	 * get the fdLevel
	 * 
	 * @return the fdLevel
	 */
	public String getFdLevel() {
		return this.fdLevel;
	}

	/**
	 * set the fdParentId
	 */
	public void setFdParentId(String fdParentId) {
		this.fdParentId = fdParentId;
	}

	/**
	 * get the fdParentId
	 * 
	 * @return the fdParentId
	 */
	public String getFdParentId() {
		return this.fdParentId;
	}

	/**
	 * set the fdName
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdName
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the display
	 */
	public void setDisplay(String display) {
		this.display = display;
	}

	/**
	 * get the display
	 * 
	 * @return the display
	 */
	public String getDisplay() {
		return this.display;
	}

	/**
	 * set the value
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/**
	 * get the value
	 * 
	 * @return the value
	 */
	public String getValue() {
		return this.value;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdMaterialId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialId")), fdMaterialId));
		setFdEngineeringId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineeringId")), fdEngineeringId));
		setFdMetric(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMetric")), fdMetric));
		setFdApplicationNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdApplicationNumber")), fdApplicationNumber));
		setFdAuditNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdAuditNumber")), fdAuditNumber));
		setFdActualNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdActualNumber")), fdActualNumber));
		setFdExportedNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdExportedNumber")), fdExportedNumber));
		setFdMaterialTypeId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialTypeId")), fdMaterialTypeId));
		setFdPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdPrice")), fdPrice));

		setFdLevel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdLevel")), fdLevel));
		setFdParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentId")), fdParentId));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));

		setDisplay(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("display")), display));
		setValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("value")), value));

	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdYear", StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));
		map.put("fdMonth", StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdMaterialId", StringUtils.toString(fdMaterialId, eiMetadata.getMeta("fdMaterialId")));
		map.put("fdEngineeringId", StringUtils.toString(fdEngineeringId, eiMetadata.getMeta("fdEngineeringId")));
		map.put("fdMetric", StringUtils.toString(fdMetric, eiMetadata.getMeta("fdMetric")));
		map.put("fdApplicationNumber", StringUtils.toString(fdApplicationNumber, eiMetadata.getMeta("fdApplicationNumber")));
		map.put("fdAuditNumber", StringUtils.toString(fdAuditNumber, eiMetadata.getMeta("fdAuditNumber")));
		map.put("fdActualNumber", StringUtils.toString(fdActualNumber, eiMetadata.getMeta("fdActualNumber")));
		map.put("fdExportedNumber", StringUtils.toString(fdExportedNumber, eiMetadata.getMeta("fdExportedNumber")));
		map.put("fdMaterialTypeId", StringUtils.toString(fdMaterialTypeId, eiMetadata.getMeta("fdMaterialTypeId")));
		map.put("fdPrice", StringUtils.toString(fdPrice, eiMetadata.getMeta("fdPrice")));

		map.put("fdLevel", StringUtils.toString(fdLevel, eiMetadata.getMeta("fdLevel")));
		map.put("fdParentId", StringUtils.toString(fdParentId, eiMetadata.getMeta("fdParentId")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));

		map.put("display", StringUtils.toString(display, eiMetadata.getMeta("display")));
		map.put("value", StringUtils.toString(value, eiMetadata.getMeta("value")));

		return map;

	}
}